<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/bootstrap.css') }}">
</head>
{% from 'macros.html' import form_field  %}
<body>
    <div class="container">
        <form method="post">
            <!-- CSRF?? -->
            {{ form.csrf_token }}
            {#
            <!--
            <div class="form-group">
                {{ form.username.label }}
                {{ form.username(class='form-control') }}
                {% for msg in form.username.errors %}
                <small class="error">{{ msg }}</small>
                {% endfor %}
            </div>
            <div class="form-group">
                {{ form.password.label }}
                {{ form.password(class='form-control') }}
                {% for msg in form.password.errors %}
                <small class="error" ?>{{ msg }}</small>
                {% endfor %}
            </div>
            -->
            #}
            {# 使用宏 #}
            {{ form_field(form.username)}}
            {{ form_field(form.password)}}
            <div class="form-check">
                {{ form.remember(class='form-check-input') }}
                {{ form.remember.label }}
            </div>
            {{ form.submit(class='btn btn-primary') }}
        </form>
    </div>
</body>

</html>